package org.tity.commons.concurrent;

import org.tity.commons.collection.MapUtil;
import org.tity.commons.network.Ajax;

public class MDMAutoCode {

	
	static class PaTest extends Thread {
    	int port=-1;
    	
    	public PaTest(int port) {
    		this.port=port;
    	}
    	
    	@Override
    	public void run() {
    		for (int i = 1; i < 15000; i++) {
    			String msg="http://10.88.20.236:"+port+"/api/integration/autocode?modelId=2713&dataId="+i;
				String result=Ajax.get(msg);
				msg+="\n"+result;
				System.out.println(this.getName()+"\n"+msg);
			}
    	}
    	
    }
    
    public static void main(String[] args) {
    	Ajax.setCookies(MapUtil.asMap("screenResolution","1536x864"));
    	for (int i = 0; i <20; i++) {
			(new PaTest(i%2==0?7001:7002)).start();
		}
    	
	}
}
